package com.game.framework.message.event;

import org.springframework.context.ApplicationContext;

public class GameMessageSystem {

    private static GameMessageListenerDispatchManager gameMessageListenerDispatchManager = new GameMessageListenerDispatchManager();
    private static GameMessageMappingDispatchManager gameMessageMappinDispatchManager = new GameMessageMappingDispatchManager();

    public GameMessageSystem() {

    }

    public static void start(ApplicationContext applicationContext) {
        //TODO
    }

    public static void registerListener(Class<? extends IGameMessage> eventClass, IGameMessageListener listener) {
        gameMessageListenerDispatchManager.registerListener(eventClass, listener);
    }

    public static void sendGameEvent(Object origin, IGameMessage gameEventMessage) {
        gameMessageListenerDispatchManager.sendGameEvent(origin, gameEventMessage);
    }
}